package com.example.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author Yu Wang
 */
@AllArgsConstructor
@Data
public class CollarMsg implements Serializable {
    private double temp;
    private double humidity;
    private double heartrate;
    private double latitude;
    private double longitude;
    private Integer stepnumber;
    private String time;

    public CollarMsg() {
        stepnumber = 0;
        SimpleDateFormat sformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//日期格式
        time = sformat.format(new Date());
    }

}
